home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 9 / FM Towns Free Software Collection 9.iso / t_os / shell / igo / gosource / mdline.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-16  |  2.2 KB  |  99 lines

  1. #define DEBUG 0
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. #include <string.h>
  5. #include <winb.h>
  6. #include <te.h>
  7. #include <fntb.h>
  8. #include <gui.h>
  9. #include "igo.h"
  10. #include "banx.h"
  11. #include "kifuctrl.h"
  12. #include "kiffile.h"
  13. #include "title.h"
  14.  
  15. extern int ban_windowId;
  16.  
  17. int    lineset_dialogId = -1 ;
  18. int    lineset_numbox = -1 ;
  19. int    lineset_bottonId[2] = -1 ;
  20.  
  21. /*    initDataMILINE:lineset_bottonId[0]:MJ_DBUTTONL40の呼び出し関数    */
  22. int    igo_lineset(kobj, messId, argc, pev, trigger)
  23. int        kobj ;
  24. int        messId ;
  25. int        argc ;
  26. EVENT    *pev ;
  27. int        trigger ;
  28. {
  29. BAN_TYPE ban_type;
  30. int bansize;
  31. int min, max, delta, ptColum; /* 使用していない */
  32.     
  33.     /*    数値入力パネルの読み取り    */
  34.     MMI_SendMessage(lineset_numbox, MM_GETNUMBOX, 5,
  35.                             &bansize, &min, &max, &delta, &ptColum) ;
  36.  
  37.     /*    lineset_dialogIdで示されるオブジェクトを消す        */
  38.     MMI_SendMessage( lineset_dialogId , MM_ERASE , 0 ) ;
  39.  
  40.     /*    オブジェクトをダイアログから取り外す    */
  41.     MMI_SendMessage( lineset_dialogId , MM_DETACH , 0 ) ;
  42.  
  43.     ban_type.type = NORMAL;
  44.     ban_type.size = bansize;
  45.     title_bantype_set( ban_type);
  46.     title_fname_clear();
  47.     /*  ここで実行しないとゴミが残る  */
  48.     title_handy_set( 0);
  49.     kifu_init();
  50.     title_dispFunc();
  51.  
  52.     line_window_resize();
  53.  
  54.     retunrInitMenuFunc();
  55.  
  56.     return NOERR ;
  57. }
  58.  
  59. /*    initDataMILINE:lineset_bottonId[1]:MJ_DBUTTONL40の呼び出し関数    */
  60. int    igo_linecancel(kobj, messId, argc, pev, trigger)
  61. int        kobj ;
  62. int        messId ;
  63. int        argc ;
  64. EVENT    *pev ;
  65. int        trigger ;
  66. {
  67.     /*    lineset_dialogIdで示されるオブジェクトを消す        */
  68.     MMI_SendMessage( lineset_dialogId , MM_ERASE , 0 ) ;
  69.  
  70.     /*    オブジェクトをダイアログから取り外す    */
  71.     MMI_SendMessage( lineset_dialogId , MM_DETACH , 0 ) ;
  72.  
  73.     retunrInitMenuFunc();
  74.  
  75.     return NOERR ;
  76. }
  77.  
  78. int    line_window_resize()
  79. {
  80. HYPER    hyp ;
  81. FRAME    org, size;
  82. int      x, y;
  83.  
  84.     MMI_SendMessage(ban_windowId, MM_GETUSER, 2, &org, &size);
  85.     MMI_SendMessage(ban_windowId, MM_GETHYPER, 1, &hyp);
  86.     MMI_SendMessage(ban_windowId, MM_ERASE, 0);
  87.  
  88.     disp_getbansize(&x, &y);
  89.     hyp.fr.rdwx = hyp.fr.lupx + org.lupx + x;
  90.     hyp.fr.rdwy = hyp.fr.lupy + org.lupy + y;
  91.     MMI_SendMessage(ban_windowId, MM_SETHYPER, 1, &hyp);
  92.  
  93.     org.rdwx = x;
  94.     org.rdwy = y;
  95.     MMI_SendMessage(ban_windowId, MM_SETUSER, 2, &org, &size);
  96.     return NOERR ;
  97.     
  98. }
  99.